package com.loongtech.bi.entity.system;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.loongtech.core.gen.GenInnerK;
import com.loongtech.core.jpa.entity.EntityIntAuto;

@Entity
@Table(name = "system_operation")
@GenInnerK
public class EntitySysOperation extends EntityIntAuto {
	private static final long serialVersionUID = 1L;
	@Column(columnDefinition="varchar(255) NOT NULL default ''")
	private String url;
	@Column(columnDefinition="varchar(255) NOT NULL default ''")
	private String method;
	@Column(columnDefinition="varchar(255) NOT NULL default ''")
	private String operation;
	@Column(columnDefinition="int(11) NOT NULL default 0")
	private int functionId;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public int getFunctionId() {
		return functionId;
	}

	public void setFunctionId(int functionId) {
		this.functionId = functionId;
	}

	@Override
	public String toString() {
		return "EntitySysOperation [url=" + url + ", method=" + method + ", operation=" + operation + ", functionId=" + functionId + "]";
	}

	public static class K {
		public static final String url = "url";
		public static final String method = "method";
		public static final String operation = "operation";
		public static final String functionId = "functionId";
		public static final String id = "id";
		public static final String version = "version";
		
		//url, method, operation, functionId, id, version, 
		public static java.util.List<String> toList() {
			java.util.List<String> list = new java.util.ArrayList<>();
			list.add(url);
			list.add(method);
			list.add(operation);
			list.add(functionId);
			list.add(id);
			list.add(version);
			return list;
		}
	}
}